﻿module RhinoMocks

open System
open System.Collections
open Rhino.Mocks
open Rhino.Mocks.Interfaces

let mstub f target =
    RhinoMocksExtensions.Stub(target, Function(f))

let mreturn value (options: IMethodOptions<'a>) =
    options.Return value

let service = MockRepository.GenerateMock<IComparer>()
service |> mstub (fun s -> s.Compare(1,2)) |> mreturn 1 |> ignore